<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>客服聊天</title>
</head>
<body>
<h1>websocket_test_me</h1>
<script>
    var websockurl='ws://192.168.1.110:8812';
    var websock_obj= new WebSocket(websockurl);
    websock_obj.onopen=function (e) {
        console.log('connect success')
        websock_obj.send('client send message');
    }

    websock_obj.onmessage=function (e) {
        console.log(e)
        console.log('ws return data '+e.data)
    }
    websock_obj.onclose=function (e) {
        console.log('client close')
    }
    websock_obj.onerror=function (e) {
        console.log('error '+e)
    }
</script>
</body>
</html>